package com.wsq.retrofitdemo.model.request;

import com.wsq.retrofitdemo.utils.Constants;
import com.wsq.retrofitdemo.utils.GenerateSign;

import java.util.HashMap;
import java.util.Map;

/**
 * Date:2021/9/1
 * Time:16:56
 * author:wushengqi
 */
public class IFlyUserBind extends IFlyBase{
    public String third_user_id = "";
    public String appid = "";
    public String phone_on = "";
    public String guid = "";

    @Override
    public String sign(){
        Map<String, String> map = new HashMap<>();
        map.put("third_user_id",third_user_id);
        map.put("appid",appid);
        map.put("phone_on",phone_on);
        map.put("guid",guid);
        map.put("clientType",clientType+"");
        try {
            return sign = GenerateSign.generateSign(openid, Constants.OPEN_KEY, "", map);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "";
    }

    @Override
    public Map<String, String> getMap(){
        Map<String, String> map = new HashMap<String, String>();
        map.put("third_user_id",third_user_id);
        map.put("appid",appid);
        map.put("phone_on",phone_on);
        map.put("guid",guid);
        map.put("clientType",clientType+"");
        map.put("sign",sign);
        map.put("openid",openid);
        return map;
    }
}
